﻿using System.Reflection;

namespace Borg
{
    internal class CloseSlotTask : Task<SlotInfo>
    {
        public CloseSlotTask(SlotInfo obj, uint taskGroupId, Assembly initiator)
            : base(obj, taskGroupId, initiator)
        { }

        public override void Execute()
        {
            obj.InternalClose(initiator, false);
        }

        public override string ToString()
        {
            return string.Format("{0}: {1}.InternalClose()", taskGroupId, obj);
        }

        public override string Name
        {
            get { return string.Format("CloseSlot({0})", obj.Name); }
        }
    }
}

